home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / l2100.zip / 3RDPARTY.DOC < prev    next >
Text File  |  1997-06-24  |  11KB  |  258 lines

  1.  
  2.               THIRD PARTY DOCUMENTATION FOR THE LORD2 ENGINE
  3.  
  4.  
  5. FOR INFO ON CREATING AN IGM FOR LORD2, READ IGM.DOC!!!!!!!!!!!!!!  This
  6. stuff is generally usefull info too, though.
  7.  
  8. This is some extra info and help on creating addons/new areas/stand alone
  9. .refs/new worlds for the LORD2 engine.
  10.  
  11. My goal is to make it easy and free (besides our cheap $15 registration
  12. fee to use more than the unregistered portion of the world screens) for
  13. any non programmer to make his own door or world.
  14.  
  15. ** The pascal structures of most data files are listed at the end of this **
  16. ** file.                                                                  **
  17.  
  18. Q:  How do I start adding screens from a clear map?
  19.  
  20. A:  Delete the files WORLD.DAT and MAP.DAT.
  21.  
  22. Q:  If I make my own world, what do I need to distribute it?
  23.  
  24. A: MAP.DAT, WORLD.DAT and all your .REF files.  Probably a good idea to
  25.    also throw in a file_id.diz and a .doc file of some sort.
  26.  
  27.    To install it, a person should setup a NEW game of LORD2 somewhere, then
  28.    copy your files over it.  Otherwise it would destroy the real LORD2 game
  29.    they were running.  Be sure to make this clear in your documentation.
  30.  
  31.    Do *NOT* distribute the GAME.DAT file.  This is where non game
  32.    information is held like their registration info (they probably don't
  33.    want this overwritten!) and ticks per second, etc.
  34.  
  35. Q: You made LORD2 and my game needs it to run - does this mean I cannot
  36.    charge people for it?
  37.  
  38. A: Charge away, I don't want any royalities, you might thank me in your
  39.    docs though. ;>  Since there is no way to compile or protect your work,
  40.    I doubt many will charge for addons which is fine by me.
  41.  
  42.    A situation that would make charging feasible is say, if you have one
  43.    full world addon, and for $5 you would send them two more.  This worked
  44.    with new LORD ansi packs for a few people, and so much more than new
  45.    ANSI can be done now.
  46.  
  47. Q: I'm editting some stuff in LORD2 - How do I know what vars you used for
  48.    what?
  49.  
  50. A: Check the VARLIST.DAT file - at the top I list every var I am using and
  51.    tell you what it is for.  Any addon you make should contain a list like
  52.    this in the file.  It also helps the Sysop's to know what stuff is, as
  53.    L2CFG.EXE reads this file to put descriptions by vars.
  54.  
  55. Q: I made my own game using your system - but it says LORDII: New World at
  56.    the bottom of the screen!! How tacky!
  57.  
  58. A: You can change this.  As well as the default <more> prompt.  Check
  59.    REFHELP.DOC to learn about the @PROGNAME and @MOREMAP commands.
  60.  
  61. Q: Do I have to use your realtime movement/messaging system?
  62.  
  63. A: No.  Download my addon BRADYREF.ZIP from my website and check it out - it
  64.    demonstrates how you can run a single .REF file for the game instead of
  65.    using the full on system.  For .REF's like these, it is possible to run
  66.    them FROM the LORD2 dir, and not disrupt LORD2's real data files, in
  67.    case the sysop also has a LORD2 game running there.
  68.  
  69.    It looks like this:  LORD2 crap+crap.ref <other parms here>.  This is
  70.    good for testing specific .ref files also.  "crap" is the label to
  71.    run, and "crap.ref" is the filename.
  72.  
  73.    When LORD2 is run this way, it behaves a little differently - for one, it
  74.    quits the game as soon as the .ref is done.  Also, you cannot use the
  75.    built in load/save player data.
  76.  
  77.    If you NEEDED this, but didn't want to use the mapping system at all, you
  78.    still can.  You would edit the @#STARTGAME function to start your main
  79.    .REF game, then do a @halt to stop the game before it moves on to the
  80.    mapping system.
  81.  
  82. -= Summary =-
  83.  
  84. In any case - *IF* you are using the mapping engine in your game, be sure
  85. to tell the user in the docs if a registered LORD2 is required so they
  86. don't think your .ref is buggy if things go wrong.
  87.  
  88. They need a registered LORD2 if:
  89.  
  90.  * You use maps that are not in the unregistered area.  This kinda tricky -
  91.    but basically all the maps you can access in the very first part of the
  92.    game up to until you get to Porttown are the unregistered area.
  93.  
  94.  * You use more than 57 items in the items system.  If they pickup/buy an
  95.    item pass 57, it will show up as blank, and will not be useable.
  96.  
  97. Please send your finishes addons/games over to me to check out, I'll put the
  98. best ones/ones that work on my web page for download!
  99.  
  100. Just email attach them mime or uue to sethable@rtsoft.com.
  101.  
  102. If you have questions and need help with .REF's please feel free to email
  103. me for help and suggestions, but even in LORD2's beta form I am getting
  104. .REF's sent to me every day to diagnose problems and such and I can see
  105. I won't be able to do this for everyone... <G>
  106.  
  107. But I'll do what I can!
  108.  
  109. Also:  I'll probably have LORD2 ref/world download area on my website soon,
  110. as well as a developers area.  So hit www.rtsoft.com once in a while to
  111. see what is new there!
  112.  
  113. -Seth (sethable@rtsoft.com)
  114.  
  115. -=-=-= Record formats for the map.dat, world.dat and trader.dat files =-=-
  116.  
  117. I got a few people wanting to make their own player/screen editors for
  118. L2, this is fine with me.  As promised here is the record formats in
  119. Pascal:
  120.  
  121.     type igm_data = record {format of the @data commands when saved}
  122.   last_used: longint; {used for the @datanewday feature, this is how it tells
  123.                        if it should reset the data because it is a new day
  124.                        or not}
  125.   data: array[1..200] of longint; {the real data is kept here}
  126.   extra: array[1..200] of char; {reserved for gracefull upgrades..
  127.                                  hey, you never know}
  128.   end;
  129.  
  130.   The above is the format for the new *.IDF files.
  131.  
  132.   type world_info = record {For the world.dat file -  this is kind of
  133.   the index for the MAP.REF file.  It tells LORD2 how each screen hooks
  134.   to each other.  loc is each screen - starting at x1,y1 is 1, then this
  135.   goes right until 80 is reached, then starts at x1,y2 for 81 etc.}
  136.   name: string[60];
  137.   loc: array[1..1600] of integer; {holds the physical map # of the
  138.   record for this screen from the MAP.DAT file.. If # is 0, there is
  139.   no screen here. }
  140.   v: array[1..40] of longint; {used by `v}
  141.   s: array[1..10] of string[80]; {used by `s}
  142.   time: longint; {year+month+day?.. not sure can't remember}
  143.   show: array[1..1600] of byte; {show up on the players auto 'map'?}
  144.   extra: array[1..396] of char; {extra for me}
  145.   end;
  146.  
  147.  
  148.   type all_players = record
  149.   p: array[1..200] of all_p;
  150.   end;
  151.  
  152.  
  153.   type user_rec = record
  154.    name : string[25]; {handle they choose for LORD2}
  155.    real_names: string[40]; {name from BBS}
  156.    gold,bank,exp: longint; {exp isn't used but reserved}
  157.    last_day_on,love: integer; {love isn't used but reserved}
  158.    wep,arm: shortint; {item # of wep/arm they have equipped}
  159.    race: string[30]; {reserved}
  160.    sex_male: integer; {1 if male.. yes there is a reason I didn't use
  161.                        a byte!! <G> }
  162.    on_now,battle: byte; {these will be OFF when a player is offline}
  163.    dead,busy,deleted,nice,map,e6: integer;
  164.    {If dead, dead is 1, if deleted, deleted is 1.  Map is map block #.}
  165.    x,y: integer; {current cordinates of player}
  166.    item: array[1..99] of integer; {items.  used by `i}
  167.    p: array[1..99] of longint;  {longints.  used by `i}
  168.    b: array[1..99] of byte;  {bytes.  Used by `t}
  169.    last_saved: longint; {last day saved}
  170.    last_day_played: longint; {duh}
  171.    lmap: integer; {last map player was on that was 'visable'}
  172.    extra: array[1..354] of char; {reserved for me}
  173.    end;
  174.  
  175.  
  176. {The update.tmp file is made up of this record, one for each player
  177. in order.  Just in case you wanted to write an ap that needed to know
  178. what was going on realtime.}
  179.  
  180.         type q_update = record
  181.     x,y: shortint;
  182.     map: integer;
  183.     on_now: byte;
  184.     busy: byte;   {these are all 0 or 1 if true}
  185.     battle: byte;
  186.     end;
  187.  
  188.  
  189.  
  190.  
  191.  
  192.     type item_struct = record  {used by item.ref}
  193.     name: string[30]; {name of item}
  194.     action: string[40];  {string for hitting someone with it}
  195.     use_once,armour,weapon,sell,used: boolean;
  196.     value: longint;   {gold value}
  197.     breakage: integer;  {break percentage per use}
  198.     max_buy: integer;  {unused for now}
  199.     def,strength: integer;  {strength/defence added if equipped}
  200.     eat: integer;    {unused for now}
  201.     ref: string[12]; {label of .ref procedure in ITEMS.REF}
  202.     use_action: string[30]; {text for using it with the .ref}
  203.     descrip: string[30]; {description of item that shows to the right}
  204.     drop: boolean; {if true, item cannot be dropped, it is a quest item}
  205.     extra: array[1..37] of char;  {reserved}
  206.     end;
  207.  
  208.     type item_rec = record {the entire ITEMS.DAT file is ONE of this
  209.     record format}
  210.     i: array[1..99] of item_struct;
  211.     end;
  212.  
  213.  
  214.     type map_info = record {used by plan_rec, which is for each
  215.                             screen}
  216.     fc: shortint; {foreground color of square}
  217.     bc: shortint; {background color of square}
  218.     c: char; {actual char}
  219.     t: integer; {can't remember}
  220.     s: shortint; {what type so it knows if you can walk through it or
  221.     not.. here is the list:
  222.  
  223. if map^.w[x,y].s = 0 then ter := 'Unpassable';
  224. if map^.w[x,y].s = 1 then ter := 'Grass';
  225. if map^.w[x,y].s = 2 then ter := 'Rocky';
  226. if map^.w[x,y].s = 3 then ter := 'Water';
  227. if map^.w[x,y].s = 4 then ter := 'Ocean';
  228. if map^.w[x,y].s = 5 then ter := 'Forest';   }
  229.  
  230.     end;
  231.  
  232.  
  233.     type special_struct = record {also used by plan_rec, the ten
  234. hotspots available all use this format}
  235.     move_place: integer; {map to move to, 0 if not a warp}
  236.     dx,dy: shortint; {xy cords of hotspot, 0 if hotspot not used}
  237.     x,y: shortint;  {xy cords of warp destination, 0 if not a warp}
  238.     refname: string[12]; {label of ref procedure to run, if not a warp}
  239.     reffile: string[12]; {filename of .ref to run if not a warp}
  240.     extra: array[1..100] of char; {reserved by me}
  241.     end;
  242.  
  243.  
  244.     type plan_rec = record {record for the MAP.DAT file, which is
  245.     screen info}
  246.    name: string[30]; {name of screen}
  247.    w: array[1..80] of array[1..20] of map_info; {each block on screen}
  248.    special: array[1..10] of special_struct; {the 10 hotspots}
  249.    battle_odds: longint; {odds of running the 'screen random ref'}
  250.    batfile: string[12]; {ref file name}
  251.    batname: string[12]; {label of ref procedure}
  252.    safe: boolean; {true if players cannot fight on this screen}
  253.    extra: array[1..469] of char; {reserved by me}
  254.    end;
  255.  
  256.  
  257.  
  258.